<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
/**
 * FormativeLab
 *
 * An open source application development framework for PHP 5.1.6 or newer
 *
 * @package		FormativeLab
 * @author		FormativeLab Dev Team
 * @copyright	Copyright (c) 2011 - 2013, FormativeLab, Inc.
 * @license		http://www.formativesoft.com/license/
 * @link		http://www.formativesoft.com/
 * @since		Version 2.0
 * @filesource ./application/core/FSL_Controller.php
 */

// ------------------------------------------------------------------------

/**
 * FormativeLab FSL_Controller Controller
 *
 * @package		FormativeLab
 * @subpackage	core
 * @category	core
 * @author		Formative Soft Ltd
 * @link		http://www.formativesoft.com/
 */

// ------------------------------------------------------------------------

/* load the MX_Router class */
require APPPATH."third_party/MX/Controller.php";

/**
 * Formative Lab Implemented Controller to peform some specially task such 
 * as load helper, model libraries, encapsulate the business logic and 
 * removing the boiler plate of codes from fornt controller. 
 **/
class FSL_Controller extends MX_Controller {
	
	/**
	 * Static property helpers use load required helpers files to access
	 * helper functions and classes.
	 *
	 * @static
	 **/
	static $helpers	= array('xml', 'url', 'text', 'model', 'method', 'dom', 'rss', 'language', 'constraints');
	
	/**
	 * Static property models use load required models to perform CRUD operation
	 * by codeIgniter Active Records and Formative Lab Implemented ORM.
	 *
	 * @static
	 **/
	static $models	= array();

	/**
	 * __construct() used to initialized Controller intance with custome 
	 * properties, loading helpers libraries, models. To serve special
	 * tasks.
	 *
	 * @access	public
	 * @return  void 
	 **/
	public function __construct($layout = 'defaults'){
        parent::__construct();
		$this->load->database();
		$this->load->helper(self::$helpers);
		$this->load->model(self::$models); //loadModel(self::$models);
		$this->load->library('Renderer', $layout, 'render');
		$this->load->library('authentication', null, 'auth');
		$this->load->library('user_agent');		
    }
	
}

/* End of file FSL_Controller.php */
/* Location: ./application/core/FSL_Controller.php */